package com.yeebo.admin.dao;

import com.yeebo.model.admin.SysResource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysResourceDao {

    int add(SysResource sysResource);

    int update(SysResource updateResource);

    SysResource getResourceByCode(@Param("resourceCode") String resourceCode);

    SysResource getResourceById(@Param("id") Long resourceId);

    List<SysResource> loadResourcesByUserId(@Param("userId") Long userId);

    List<SysResource> loadResourcesByRoleId(@Param("roleId") Long roleId);

    List<SysResource> loadAllValidResources();

}
